firstIsInstance

inline fun <T : Any> Array<*>.firstIsInstance(check: (T) -> Boolean = { true }): T(source)

Finds the first T element of this array that satisfies the check, throwing an error if nothing was found.


inline fun <T : Any> Iterator<*>.firstIsInstance(check: (T) -> Boolean = { true }): T(source)

Finds the first T element of this iterator that satisfies the check, throwing an error if nothing was found.


inline fun <T : Any> Iterable<*>.firstIsInstance(check: (T) -> Boolean = { true }): T(source)

Finds the first T element of this iterable that satisfies the check, throwing an error if nothing was found.


inline fun <T : Any> Sequence<*>.firstIsInstance(check: (T) -> Boolean = { true }): T(source)

Finds the first T element of this sequence that satisfies the check, throwing an error if nothing was found.